Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise MSRV to Rust 1.80 #6105

Draft
wants to merge 10 commits into
base: trunk
Choose a base branch
from

Conversation

ErichDonGubler
Copy link
Member

@ErichDonGubler ErichDonGubler commented Aug 12, 2024

Depends on bug 1894131.

Depends on #6147.

Depends on #6180.

@ErichDonGubler ErichDonGubler added area: infrastructure Testing, building, coordinating issues kind: refactor Making existing function faster or nicer labels Aug 12, 2024
@ErichDonGubler ErichDonGubler self-assigned this Aug 12, 2024
@ErichDonGubler ErichDonGubler force-pushed the rust-lints-with-1.80 branch 6 times, most recently from 5b300f7 to 13db95e Compare August 12, 2024 12:26
@ErichDonGubler
Copy link
Member Author

Heeey, we're finally running into the same annoying errors here that I wasn't sure what to do with locally when I saw them:

error: trait `ContextId` is never used
  --> wgpu/src/context.rs:25:11
   |
25 | pub trait ContextId: Into<ObjectId> + From<ObjectId> + Debug + 'static {}
   |           ^^^^^^^^^
   |
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`

error: methods `device_downlevel_properties`, `device_mark_lost`, `render_bundle_encoder_multi_draw_indirect`, `render_bundle_encoder_multi_draw_indexed_indirect`, `render_bundle_encoder_multi_draw_indirect_count`, and `render_bundle_encoder_multi_draw_indexed_indirect_count` are never used
   --> wgpu/src/context.rs:190:8
    |
34  | pub trait Context: Debug + WasmNotSendSync + Sized {
    |           ------- methods in this trait
...
190 |     fn device_downlevel_properties(
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
290 |     fn device_mark_lost(
    |        ^^^^^^^^^^^^^^^^
...
793 |     fn render_bundle_encoder_multi_draw_indirect(
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
802 |     fn render_bundle_encoder_multi_draw_indexed_indirect(
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
812 |     fn render_bundle_encoder_multi_draw_indirect_count(
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
825 |     fn render_bundle_encoder_multi_draw_indexed_indirect_count(
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: methods `device_downlevel_properties`, `device_mark_lost`, `render_bundle_encoder_multi_draw_indirect`, `render_bundle_encoder_multi_draw_indexed_indirect`, `render_bundle_encoder_multi_draw_indirect_count`, and `render_bundle_encoder_multi_draw_indexed_indirect_count` are never used
    --> wgpu/src/context.rs:1249:8
     |
1171 | pub(crate) trait DynContext: Debug + WasmNotSendSync {
     |                  ---------- methods in this trait
...
1249 |     fn device_downlevel_properties(
     |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
1349 |     fn device_mark_lost(&self, device: &ObjectId, device_data: &crate::Data, message: &str);
     |        ^^^^^^^^^^^^^^^^
...
1790 |     fn render_bundle_encoder_multi_draw_indirect(
     |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
1799 |     fn render_bundle_encoder_multi_draw_indexed_indirect(
     |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
1809 |     fn render_bundle_encoder_multi_draw_indirect_count(
     |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
1822 |     fn render_bundle_encoder_multi_draw_indexed_indirect_count(
     |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    Checking naga-fuzz v0.0.0 (/Users/runner/work/wgpu/wgpu/naga/fuzz)
    Checking d3d12 v22.0.0 (/Users/runner/work/wgpu/wgpu/d3d12)
error: could not compile `wgpu` (lib) due to 3 previous errors

☝🏻 @cwfitzgerald, @Wumpf: Not sure how to best proceed here, but I haven't given it many brain cycles, either. Will dedicate more in the absence of feedback in the next day or so.

@ErichDonGubler ErichDonGubler force-pushed the rust-lints-with-1.80 branch 4 times, most recently from 3aa12e9 to b5973ab Compare August 12, 2024 12:53
@ErichDonGubler ErichDonGubler changed the title Resolve yet more lints from Rust 1.80, but which are only resolvable in Rust 1.80 or newer Resolve Rust 1.80 lints Aug 12, 2024
@ErichDonGubler ErichDonGubler force-pushed the rust-lints-with-1.80 branch 2 times, most recently from a7cfba6 to 4e2f6ce Compare August 13, 2024 07:49
@ErichDonGubler
Copy link
Member Author

Leaving this as a draft until we actually have the option to upgrade to Rust 1.80.

We might be able to hoist the upgrade to cfg_aliases out if katharostech/cfg_aliases#10 merges and is released.

@ErichDonGubler

This comment was marked as resolved.

@kornelski

This comment was marked as resolved.

@ErichDonGubler

This comment was marked as resolved.

naga/src/back/msl/mod.rs Outdated Show resolved Hide resolved
@ErichDonGubler ErichDonGubler force-pushed the rust-lints-with-1.80 branch 3 times, most recently from 8b2fa00 to da21df7 Compare September 5, 2024 12:48
@ErichDonGubler ErichDonGubler changed the title Resolve Rust 1.80 lints Raise MSRV to Rust 1.80 Sep 5, 2024
@ErichDonGubler ErichDonGubler force-pushed the rust-lints-with-1.80 branch 6 times, most recently from b592e24 to e7a9ca0 Compare September 6, 2024 00:39
@cwfitzgerald
Copy link
Member

We can bump the repo msrv without the core msrv, so this doesn't need to block on ff

@ErichDonGubler
Copy link
Member Author

@cwfitzgerald: This PR contains strictly backwards-incompatible changes, including in wgpu-core and wgpu-hal here. That's why I've kept this a draft and split out backwards-compatible changes repeatedly, trying to make CI green. I suppose we could reasonably split out the wgpu- and examples-specific changes for a separately mergeable PR! I don't think I'll be allocating the bandwidth for that for at least a week, but I'd be happy to review somebody who might do that before I did.

@ErichDonGubler
Copy link
Member Author

Not sure why GL tests are failing. I suspect this PR is at fault, but I'm not sure yet.

@ErichDonGubler ErichDonGubler force-pushed the rust-lints-with-1.80 branch 3 times, most recently from ff0ed8f to d95e25f Compare September 19, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infrastructure Testing, building, coordinating issues kind: refactor Making existing function faster or nicer
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants